#include<stdio.h>
int getgcd(int m,int n);
int main(void)
{
	int x,y,a;
	printf("Input two positive integers:\n");
	scanf("%d%d", &x, &y);
	a=getgcd(x,y);
    printf("a=%d\n", a);	
}
int getgcd(int m,int n)
{
	int gcd;
    if (m < n)
		gcd = m;
	else
		gcd = n;
	while (m % gcd || n % gcd)
		gcd--;
	return gcd;
}